import axios from "../plugin/http";
let baseURL = "";
if (process.env.NODE_ENV === 'production') {
  baseURL = 'http://18.191.16.200:13000'
}

export function getAccessToken(payload) {
  return axios
    .post(`${baseURL}/audit/getAccessToken`, {
      "header": {
        "sysCode": "VOTE_SERVICE",
        "platform": window.navigator.platform,
        "timestamp": new Date().getTime()
      },
      "payload": {
        "account": payload.account,
        "password": payload.password
      }
    })
}
